/**
 * Created by douxin on 15/4/15.
 */
var express = require('express');
var router = express.Router();

//get workstation
router.get('/', function(req, res, next) {
    if (! req.session.user ) { return res.redirect("/users"); }
    res.render('workstation', {user: req.session.user});
});

router.all('/app/', function(req, res, next) {
    switch (req.method) {
        case 'POST':
            console.log(req.body.app_name);
            console.log(req.files);
            res.set('Content-Type', 'application/json');
            res.status(201).json({'code': 0});
            break;
    }

});
module.exports = router;